
import React, { Component } from 'react';
import { Router, Route, hashHistory, IndexRedirect, browserHistory,IndexRoute } from 'react-router';
// 引入redux
import {connect} from 'react-redux'
import *as iframeRouterAction from '../../../action/iframeRouter.js'
import {bindActionCreators} from 'redux'

import {Layout, Menu, Breadcrumb, Icon,Button,Modal} from 'antd';
import '../../../style/index.less';
import Slider from '../../../components/SiderCustom/SiderCustom';
import HeaderCustom from '../../../components/HeaderComponent/HeaderCustom';
// import App from '../App';
// import Login from '../pages/login/login';
// import ERPFetch from '../utils/Fetch/ERPfetch';
// import Mutil from '../utils/mm'
// import Iframe from 'react-iframe';
// import MutilsCookie from '../utils/cookie.js'


const {Content, Footer} = Layout;
const SubMenu = Menu.SubMenu;

function isInArray(arr,targetKay){
    for(var i = 0; i < arr.length; i++){
        if(targetKay === arr[i].key){
            return true;
        }
    }
    return false;
}
class HomeTwo extends Component {
    constructor(props) {
        super(props);

        this.state = {
            tabList: [],//tab值数组
            activeKey:'',
        };
    }
    render() {
        // console.log(this.state.tabList)
        return (
            <Layout>
                <Slider onItemSelected={this._onMenuItemSelected} onCollapsed={this.state.collapsed} sliderLogoutAction={this.logout}/>
                <Layout>
                    <HeaderCustom  path={this.props.location.pathname} logoutAction={this.logout} onToggle = {this.toggleHome} onCollapsed={this.state.collapsed}/>
                    {/**/}
                    <Content style={{overflow: 'hidden',minHeight:600}} className="content">
                      2222
                    </Content>
                </Layout>
            </Layout>
        )
    }
}
function mapStateToProps(state) {
    return{
        iframeRouter:state.iframeRouter
    }

}
function mapDispatchToProps(dispatch) {
    return{
        iframeRouterAction:bindActionCreators(iframeRouterAction,dispatch)
    }
}
export default connect(
    mapStateToProps,
    mapDispatchToProps
)(HomeTwo)